<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
<%--<html>--%>
<%--<head>--%>
<%--    <title>欢迎注册</title>--%>
<%--</head>--%>
<%--<body>--%>

<%--<div align="center">--%>
<%--    <form action="${pageContext.request.contextPath}/register.do" method="post">--%>
<%--        用户名：<input id="userName" name="userName" type="text" placeholder="请输入用户名"><br>--%>
<%--        密  码：<input id="password" name="password" type="password" placeholder="请输入密码"><br>--%>
<%--        <input type="submit">--%>
<%--    </form>--%>
<%--</div>--%>


<%--</body>--%>
<%--</html>--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
    <title>欢迎注册</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/register.css">
    <script src="${pageContext.request.contextPath}/static/bootstrap3/js/jquery-1.11.2.min.js"></script>

    <script type="text/javascript">
        function checkForm(){
            var userNumber=$("#userNumber").val();
            var userName=$("#userName").val();
            var password=$("#password").val();
            if(userNumber==null||userNumber==""){
                $("#error").html("学号不能为空！");
                return false;
            }
            if(userName==null||userName==""){
                $("#error").html("用户名不能为空！");
                return false;
            }
            if(password==null||password==""){
                $("#error").html("密码不能为空！");
                return false;
            }
            alert("注册成功，即将去到主页面！");
            return true;
        }
    </script>

</head>
<body>
<header>
    <div class="header-line"></div>
</header>
<div class="content">
    <img class="content-logo" src="${pageContext.request.contextPath}/static/images/register.png" alt="logo">

    <h1 class="content-title">创建账户</h1>

    <div class="content-form">
        <form method="post" action="${pageContext.request.contextPath}/register.do" onsubmit="return checkForm()">
            <div id="change_margin_1">
                <input class="user" id="userNumber" type="text" name="userNumber" placeholder="请输入学号">
            </div>

            <div id="change_margin_4">
                <input class="user" id="userName" type="text" name="userName" placeholder="姓名格式例如：18 大数据 张三">
            </div>

            <div id="change_margin_2">
                <input class="password" id="password" type="password" name="password" placeholder="请输入密码">
            </div>

            <span><font color="red" id="error">${errorInfo }</font></span>

            <div id="change_margin_3">
                <input type="submit" class="content-form-signup" value="确认">
            </div>
        </form>
    </div>
    <div class="content-login-description">已经拥有账户？</div>
    <div><a class="content-login-link" href="${pageContext.request.contextPath}/login.jsp">登录</a></div>
</div>
</body>
</html>